import request from '@/utils/request'

// 查询积分商城商品分类列表
export function listMallGoodsCategory(query) {
  return request({
    url: '/customer/mallGoodsCategory/list',
    method: 'get',
    params: query
  })
}

// 查询积分商城商品分类详细
export function getMallGoodsCategory(id) {
  return request({
    url: '/customer/mallGoodsCategory/' + id,
    method: 'get'
  })
}

// 新增积分商城商品分类
export function addMallGoodsCategory(data) {
  return request({
    url: '/customer/mallGoodsCategory',
    method: 'post',
    data: data
  })
}

// 修改积分商城商品分类
export function updateMallGoodsCategory(data) {
  return request({
    url: '/customer/mallGoodsCategory',
    method: 'put',
    data: data
  })
}

// 删除积分商城商品分类
export function delMallGoodsCategory(id) {
  return request({
    url: '/customer/mallGoodsCategory/' + id,
    method: 'delete'
  })
}

// 查询学习库分类树列表
export function mallGoodsCategoryTree() {
  return request({
    url: '/customer/mallGoodsCategory/mallGoodsCategoryTree',
    method: 'get'
  })
}
